import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    totle: "",
    tab: false,
    nnn: true,
    //城市选择页面需要显示的logo
    logo: true,
    login: true,
    // 设置二级页面的返回按钮
    back: false,
    // 设置首页的搜索图标显示与隐藏
    seach: false,
    // 这是标题
    title: "",
    apple: [],
    shouhuo: [],
  },
  mutations: {
    changTotle(state, index) {
      state.totle = index
    },
    changParametersorting(state, value2) {
      state.parametersorting = value2
    },
    // 控制tbr的显示与隐藏
    changetab(state, show) {
      state.tab = show
    },
    //触发logo显隐
    changeNavState(state, show) {
      state.logo = show
      state.login = show
    },
    // 控制二级页面返回键的出现
    changeback(state, show) {
      state.back = show;
    },
    // 控制级页面搜索的出现
    changeseach(state, show) {
      state.seach = show;
    },
    // 控制级页面搜索的出现
    changelogin(state, show) {
      state.login = show;
    },
    // 控制级页面标题的出现
    changetitle(state, title) {
      console.log('-----------------------------');
      console.log(state.title);
      state.title = title;
      console.log(state);
    },
    changennn(state, show) {
      state.nnn = show
    }
  },
  actions: {
  },
  modules: {
  }
})
